package com.dbz.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.dbz.entity.Journal;
import com.dbz.entity.Product;
import com.dbz.entity.ProductType;
import org.apache.ibatis.annotations.Param;
import org.apache.xmlbeans.impl.xb.xsdschema.Public;

import java.util.Set;

public interface ProductTypeDao extends BaseMapper<ProductType> {

     /**
     * 分页查询
     * @param page
     * @param queryMapper
     * @return
     */
    public IPage<ProductType> selectPage(IPage<ProductType> page, @Param(Constants.WRAPPER) Wrapper<ProductType> queryMapper);

    /**
     * 添加类别信息
     * @param protypename
     * @return
     */
    public int insertProType(String protypename);

    /**
     * 修改类别信息
     * @param protypename
     * @return
     */
    public int updateProType(Integer protypeid,String protypename);

    /**
     * 删除分类信息
     * @param protypeid
     * @return
     */
    public int deleteProType(Integer protypeid);

//查询多级分类
    public Set<ProductType> selectproType();

}
